#!/bin/bash
#chkconfig:2345 80 90
#description:ui.neiyibaba.cn release shell

releaseAll(){
    mvn clean
    mvn install -Dmaven.test.skip=true
    scp -P 7698 ./portal/target/portal.war ./app/target/nybb.war root@www.cmchuanghe.com:/usr/local/neiyi-tomcat-off/web_package_tmp/
    ssh -p 7698 root@www.cmchuanghe.com "cd /usr/local/neiyi-tomcat-off/webapps/ ; scp ../web_package_tmp/*.war root@172.19.172.27:/usr/local/neiyi-tomcat/web_package_tmp/"
    ssh root@47.100.41.110 "cd /usr/local/neiyi-tomcat/ && sh webapps/release-all.sh && tail -f logs/catalina.out"
}


releaseAll
